﻿<%@ Page Language="C#" MasterPageFile="~/Shared/Site.Master" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="Toolkit.Web.Examples.DataGrid.Index" %>
<%@ Register TagPrefix="toolkit" TagName="datagrid" Src="~/DataGrid/Index_Ajax.ascx" %>

<asp:Content ContentPlaceHolderID="Title" runat="server">
    DataGrid
</asp:Content>

<asp:Content ContentPlaceHolderID="StyleSheetIncludes" runat="server">
    <link href="/Content/StyleSheets/DataGrid.css" rel="stylesheet" />
</asp:Content>

<asp:Content ContentPlaceHolderID="PageContent" runat="server">
    <div class="section">
        <h2>Example</h2>
        <toolkit:datagrid ID="grid" runat="server" />
    </div>
</asp:Content>

<asp:Content ContentPlaceHolderID="JavaScriptIncludes" runat="server">
    <script src="/Scripts/jqkit.min.js"></script>
    <script src="/Scripts/jqkit.plugins.min.js"></script>
    <script src="/Scripts/jqkit.components.min.js"></script>

    <script>
        function test_OnAfterLoad() {
            try { console.log('onAfterLoad'); } catch(error) {};
        }
        function test_OnBeforeDataBind(keyValues) {
            keyValues.push({ key: 'Test2.Name2', value: 'hello world (from event handler)' });
            try { console.log('onBeforeDataBind'); } catch(error) {}
        }
        function test_OnAfterDataBind() {
            try { console.log('onAfterDataBind'); } catch(error) {}
        }
        function test_OnBeforeDisplayChange() {
            try { console.log('onBeforeDisplayChange'); } catch(error) {}
        }
        function test_OnAfterDisplayChange() {
            try { console.log('onAfterDisplayChange'); } catch(error) {}
        }
        function test_OnDataBindOverride(data) {
            try { console.log('onDataBindOverride'); } catch(error) {}
        }
        function test_OnAfterRowSelectionChange(key, selected) {
            try { console.log('onAfterRowSelectionChange'); } catch(error) {}
        }
    </script>
</asp:Content>
